<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Template_Grammar</title>
    <script src="../Vue.js" type="text/javascript"></script>
</head>
<body>
    <div id="app">
        <!--有v-once插入之后不可修改-->
        <h1>{{msg}}</h1>
        <h1 v-once>{{msg}}</h1>
        <!--转义为HTML标签-->
        <h1>{{htmlTxt}}</h1>
        <h1 v-html="htmlTxt"></h1>
        <!--绑定动态属性-->
        <div v-bind:id="idname">
            <h1>登录</h1>
        </div>
        <button v-on:click="changeBG">改变背景</button>
    </div>

    <script type="text/javascript">
        var app = new Vue({
            el:"#app",
            data:{
            	idname:"login",
            	msg:"我是msg",
            	htmlTxt:"<span>hello</span>"
            }
        })
    </script>
</body>
</html>